# define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int main() {
    int seconds = 0;
    scanf("%d", &seconds);
    int hour = seconds / 3600;
    int minute = (seconds % 3600) / 60;
    int second = (seconds % 3600) % 60;
    printf("%d %d %d\n", hour, minute, second);




    return 0;
}